From: Cosimo Cecchi Date: Mon, 26 Nov 2012 22:01:44 +0000 (-0500) Subject: app-display: use a GAppInfo for the settings provider X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5296 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=a43ee41b0bd2a6de6f4c9d28d9d2ab4bd27b95b1;p=gnome-shell.git app-display: use a GAppInfo for the settings provider this._gnomecc is currently unused; we actually need a GAppInfo for this provider if we want to display an icon next to it (see future commits), so just turn it into one. We might move this to an external provider altogether in the future. https://bugzilla.gnome.org/show_bug.cgi?id=689735 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index be5de9068..c7250e103 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1,6 +1,7 @@ // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- const Clutter = imports.gi.Clutter; +const Gio = imports.gi.Gio; const GLib = imports.gi.GLib; const Gtk = imports.gi.Gtk; const GMenu = imports.gi.GMenu; @@ -374,7 +375,7 @@ const SettingsSearchProvider = new Lang.Class({ this.parent(_("SETTINGS")); this._appSys = Shell.AppSystem.get_default(); - this._gnomecc = this._appSys.lookup_app('gnome-control-center.desktop'); + this.appInfo = Gio.DesktopAppInfo.new('gnome-control-center.desktop'); }, getResultMetas: function(prefs, callback) { @@ -407,6 +408,11 @@ const SettingsSearchProvider = new Lang.Class({ let app = resultMeta['id']; let icon = new AppWellIcon(app); return icon.actor; + }, + + launchSearch: function(terms) { + // FIXME: this should be a remote search provider + this.appInfo.launch([], global.create_app_launch_context()); } });